package app.view.component.movie 
{
	import app.facade.App;
	import com.temple.core.CoreMovieClip;
	import flash.display.MovieClip;
	import flash.events.MouseEvent;
	/**
	 * ...
	 * @author PHANCUONG87
	 */
	
	[Embed(source="../../../../../lib/ui.swf", symbol="control")] 
	public class Control extends CoreMovieClip
	{
		public var mcSetting:MovieClip;
		public var mcSound:MovieClip;
		public function Control() 
		{
			mcSetting.addEventListener(MouseEvent.MOUSE_UP, eventHanler);
			mcSound.addEventListener(MouseEvent.MOUSE_UP, eventHanler);
			mcSound.gotoAndStop(1);
		}
		
		public function eventHanler(evt:MouseEvent):void 
		{
			switch (evt.currentTarget) 
			{
				case mcSetting:
					sendNotification(App.SHOW_SETTING)
				break;
				case mcSound:
					if (mcSound.currentFrame == 1) mcSound.gotoAndStop(2);
					else mcSound.gotoAndStop(1);
				break;
				default:
			}
		}
	}

}